<?php get_header(); ?>
  <div class="content">
    <div class="reg_wrapper3">
      <form method="post" action="player_search.php" >
            <div class="q_info">请输入注册时填写的信息：<br />（以下所有输入框都需要填写）</div>
            <div class="q_name">孩子姓名：<input name="child_name" type="text" size="8" maxlength="10" /></div>
            <div class="q_p_name">父母姓名：<input name="parent_name" type="text" size="8" maxlength="10" /></div>
            <div class="q_idcard">父母身份证号码：<input name="parent_idcard" type="text" size="18" maxlength="24" /></div>
            <div class="q_btn"><input type="image" name="submit" src="<?php bloginfo('stylesheet_directory'); ?>/images/btn_submit.jpg" /></div>
      </form>
    </div>
  </div><!-- content -->
  <script type="text/javascript">
    $().ready(function() {
        $("form").bind('submit', form_submit);
    });

    function form_submit() {
        var error = false;
        var error_msg = '';
        var error_blank = false;
        var msg_blank = "请完整填写信息，所有字段都是必填项。";
		if (!$("input[name='child_name']").attr("value")) {
			error = true;
			error_blank = true;
		}
		if (!$("input[name='parent_name']").attr("value")) {
			error = true;
			error_blank = true;
		}
		if (!$("input[name='parent_idcard']").attr("value")) {
			error = true;
			error_blank = true;
		}

		if (error_blank) error_msg = msg_blank +  error_msg;
        if (error) {
            alert(error_msg);
            return false;
        }
        return true;
    }
  </script>
<?php get_footer(); ?>
